Optimal. Leaf size=214 \[ \frac{2 \left (7 a^2 B+14 a A b+5 b^2 B\right ) \text{EllipticF}\left (\frac{1}{2} (c+d x),2\right )}{21 d}-\frac{2 \left (5 a^2 A+6 a b B+3 A b^2\right ) E\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{5 d}+\frac{2 \left (7 a^2 B+14 a A b+5 b^2 B\right ) \sin (c+d x)}{21 d \cos ^{\frac{3}{2}}(c+d x)}+\frac{2 \left (5 a^2 A+6 a b B+3 A b^2\right ) \sin (c+d x)}{5 d \sqrt{\cos (c+d x)}}+\frac{2 b (2 a B+A b) \sin (c+d x)}{5 d \cos ^{\frac{5}{2}}(c+d x)}+\frac{2 b^2 B \sin (c+d x)}{7 d \cos ^{\frac{7}{2}}(c+d x)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.396129, antiderivative size = 214, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 7, integrand size = 33, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.212, Rules used = {2954, 2988, 3021, 2748, 2636, 2641, 2639} \[ \frac{2 \left (7 a^2 B+14 a A b+5 b^2 B\right ) F\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{21 d}-\frac{2 \left (5 a^2 A+6 a b B+3 A b^2\right ) E\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{5 d}+\frac{2 \left (7 a^2 B+14 a A b+5 b^2 B\right ) \sin (c+d x)}{21 d \cos ^{\frac{3}{2}}(c+d x)}+\frac{2 \left (5 a^2 A+6 a b B+3 A b^2\right ) \sin (c+d x)}{5 d \sqrt{\cos (c+d x)}}+\frac{2 b (2 a B+A b) \sin (c+d x)}{5 d \cos ^{\frac{5}{2}}(c+d x)}+\frac{2 b^2 B \sin (c+d x)}{7 d \cos ^{\frac{7}{2}}(c+d x)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2954
Rule 2988
Rule 3021
Rule 2748
Rule 2636
Rule 2641
Rule 2639
Rubi steps
\begin{align*} \int \frac{(a+b \sec (c+d x))^2 (A+B \sec (c+d x))}{\cos ^{\frac{3}{2}}(c+d x)} \, dx &=\int \frac{(b+a \cos (c+d x))^2 (B+A \cos (c+d x))}{\cos ^{\frac{9}{2}}(c+d x)} \, dx\\ &=\frac{2 b^2 B \sin (c+d x)}{7 d \cos ^{\frac{7}{2}}(c+d x)}-\frac{2}{7} \int \frac{-\frac{7}{2} b (A b+2 a B)-\frac{1}{2} \left (14 a A b+7 a^2 B+5 b^2 B\right ) \cos (c+d x)-\frac{7}{2} a^2 A \cos ^2(c+d x)}{\cos ^{\frac{7}{2}}(c+d x)} \, dx\\ &=\frac{2 b^2 B \sin (c+d x)}{7 d \cos ^{\frac{7}{2}}(c+d x)}+\frac{2 b (A b+2 a B) \sin (c+d x)}{5 d \cos ^{\frac{5}{2}}(c+d x)}-\frac{4}{35} \int \frac{-\frac{5}{4} \left (14 a A b+7 a^2 B+5 b^2 B\right )-\frac{7}{4} \left (5 a^2 A+3 A b^2+6 a b B\right ) \cos (c+d x)}{\cos ^{\frac{5}{2}}(c+d x)} \, dx\\ &=\frac{2 b^2 B \sin (c+d x)}{7 d \cos ^{\frac{7}{2}}(c+d x)}+\frac{2 b (A b+2 a B) \sin (c+d x)}{5 d \cos ^{\frac{5}{2}}(c+d x)}-\frac{1}{5} \left (-5 a^2 A-3 A b^2-6 a b B\right ) \int \frac{1}{\cos ^{\frac{3}{2}}(c+d x)} \, dx-\frac{1}{7} \left (-14 a A b-7 a^2 B-5 b^2 B\right ) \int \frac{1}{\cos ^{\frac{5}{2}}(c+d x)} \, dx\\ &=\frac{2 b^2 B \sin (c+d x)}{7 d \cos ^{\frac{7}{2}}(c+d x)}+\frac{2 b (A b+2 a B) \sin (c+d x)}{5 d \cos ^{\frac{5}{2}}(c+d x)}+\frac{2 \left (14 a A b+7 a^2 B+5 b^2 B\right ) \sin (c+d x)}{21 d \cos ^{\frac{3}{2}}(c+d x)}+\frac{2 \left (5 a^2 A+3 A b^2+6 a b B\right ) \sin (c+d x)}{5 d \sqrt{\cos (c+d x)}}-\frac{1}{5} \left (5 a^2 A+3 A b^2+6 a b B\right ) \int \sqrt{\cos (c+d x)} \, dx-\frac{1}{21} \left (-14 a A b-7 a^2 B-5 b^2 B\right ) \int \frac{1}{\sqrt{\cos (c+d x)}} \, dx\\ &=-\frac{2 \left (5 a^2 A+3 A b^2+6 a b B\right ) E\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{5 d}+\frac{2 \left (14 a A b+7 a^2 B+5 b^2 B\right ) F\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{21 d}+\frac{2 b^2 B \sin (c+d x)}{7 d \cos ^{\frac{7}{2}}(c+d x)}+\frac{2 b (A b+2 a B) \sin (c+d x)}{5 d \cos ^{\frac{5}{2}}(c+d x)}+\frac{2 \left (14 a A b+7 a^2 B+5 b^2 B\right ) \sin (c+d x)}{21 d \cos ^{\frac{3}{2}}(c+d x)}+\frac{2 \left (5 a^2 A+3 A b^2+6 a b B\right ) \sin (c+d x)}{5 d \sqrt{\cos (c+d x)}}\\ \end{align*}
Mathematica [A] time = 4.6096, size = 191, normalized size = 0.89 \[ \frac{2 \left (5 \left (7 a^2 B+14 a A b+5 b^2 B\right ) \text{EllipticF}\left (\frac{1}{2} (c+d x),2\right )-21 \left (5 a^2 A+6 a b B+3 A b^2\right ) E\left (\left .\frac{1}{2} (c+d x)\right |2\right )+\frac{5 \left (7 a^2 B+14 a A b+5 b^2 B\right ) \sin (c+d x)}{\cos ^{\frac{3}{2}}(c+d x)}+\frac{21 \left (5 a^2 A+6 a b B+3 A b^2\right ) \sin (c+d x)}{\sqrt{\cos (c+d x)}}+\frac{21 b (2 a B+A b) \sin (c+d x)}{\cos ^{\frac{5}{2}}(c+d x)}+\frac{15 b^2 B \sin (c+d x)}{\cos ^{\frac{7}{2}}(c+d x)}\right )}{105 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 8.288, size = 859, normalized size = 4. \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{B b^{2} \sec \left (d x + c\right )^{3} + A a^{2} +{\left (2 \, B a b + A b^{2}\right )} \sec \left (d x + c\right )^{2} +{\left (B a^{2} + 2 \, A a b\right )} \sec \left (d x + c\right )}{\cos \left (d x + c\right )^{\frac{3}{2}}}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (B \sec \left (d x + c\right ) + A\right )}{\left (b \sec \left (d x + c\right ) + a\right )}^{2}}{\cos \left (d x + c\right )^{\frac{3}{2}}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]